package com.firefighting.dao;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.firefighting.entity.Task;

public interface TaskMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Task record);

    int insertSelective(Task record);

    Task selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Task record);

    int updateByPrimaryKeyWithBLOBs(Task record);

    int updateByPrimaryKey(Task record);
    
  //Hanjd 根据buildingId查询任务id
    List<Task> selectByBuildingId(Integer buildingId);
    //Liuxc 查询属于计划的任务
	List<Task> selectByPlanIdList(List<Integer> planIdList);
	
	/** zhyan 查询维保任务列表 */
	@SuppressWarnings("rawtypes")
	List<HashMap> selectMaintenanceTaskList();
	
	@SuppressWarnings("rawtypes")
	List<HashMap>selectExactMaintenanceTaskList(@Param("id") String id);
	
	@SuppressWarnings("rawtypes")
	List<HashMap>selectEnterMaintenanceTaskList(@Param("id") Integer enterId);
	
	/** zhyan 根据维保任务的id查询该维保任务的详细内容 */
	@SuppressWarnings("rawtypes")
	HashMap selectMaintenanceTaskById(@Param("id") int id);
	
	/** zhyan 根据id更新任务审核结果和审核意见 */
	int updateCheckResultAndOpinionById(@Param("id") int id, @Param("status") String status, @Param("checkOpinion") String checkOpinion, @Param("auditor") String auditor);
	/**
	 * @author Liuxc
	 * 根据合同查询任务
	 * */
	List<HashMap> getTaskListByContracrId(@Param("contractId")int id);
}
